/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Lorena
 */
public class MaintenanceConsole {

    public static void main(String args[]) {
        MaintenanceMonitor monitor = null;
        boolean Done = false;

        System.out.println("\n\n\n\n");
        System.out.println("Environmental Maintenance System (EMS) Command Console: \n");
        if (args.length == 1) {
            // event manager is not on the local system

            monitor = new MaintenanceMonitor(args[0]);

        } else if (args.length == 2) {

            monitor = new MaintenanceMonitor(args[0], args[1]);

        } else {
            monitor = new MaintenanceMonitor();
        }
        // if
        if (monitor.IsRegistered()) {

          

            if (args.length != 0) {
                System.out.println("Using event manger at: " + args[0] + "\n");
            } else {
                System.out.println("Using local event manger \n");
            }
            monitor.start();

        }
    }
}

